 package com.lj.mcore.entity;


 import com.lj.mcore.domain.IdEntity;
 import jakarta.persistence.*;

 import java.util.ArrayList;
 import java.util.List;

 @Entity
 @Table(name="shopping_goodstype")
 public class GoodsType extends IdEntity
 {
   private String name;
   private int sequence;
 
   @ManyToMany
   @JoinTable(name="shopping_goodstype_spec", joinColumns={@JoinColumn(name="type_id")}, inverseJoinColumns={@JoinColumn(name="spec_id")})
   private List<GoodsSpecification> gss = new ArrayList();
 
   @ManyToMany
   @JoinTable(name="shopping_goodstype_brand", joinColumns={@JoinColumn(name="type_id")}, inverseJoinColumns={@JoinColumn(name="brand_id")})
   private List<GoodsBrand> gbs = new ArrayList();
 
   @OneToMany(mappedBy="goodsType", cascade={CascadeType.REMOVE})
   private List<GoodsTypeProperty> properties = new ArrayList();
 
   @OneToMany(mappedBy="goodsType")
   private List<GoodsClass> gcs = new ArrayList();
 
   public List<GoodsClass> getGcs() {
     return this.gcs;
   }
 
   public void setGcs(List<GoodsClass> gcs) {
     this.gcs = gcs;
   }
 
   public String getName() {
     return this.name;
   }
 
   public void setName(String name) {
     this.name = name;
   }
 
   public int getSequence() {
     return this.sequence;
   }
 
   public void setSequence(int sequence) {
     this.sequence = sequence;
   }
 
   public List<GoodsSpecification> getGss() {
     return this.gss;
   }
 
   public void setGss(List<GoodsSpecification> gss) {
     this.gss = gss;
   }
 
   public List<GoodsBrand> getGbs() {
     return this.gbs;
   }
 
   public void setGbs(List<GoodsBrand> gbs) {
     this.gbs = gbs;
   }
 
   public List<GoodsTypeProperty> getProperties() {
     return this.properties;
   }
 
   public void setProperties(List<GoodsTypeProperty> properties) {
     this.properties = properties;
   }
 }



 
 